<%@page import="com.niit.utils.Page"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE HTML>
<html>
<head>
<c:set value="${pageContext.request.contextPath}" var="path"
	scope="page" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="${path}/css/ustyle.css">
<link rel="stylesheet" type="text/css" href="${path}/css/user_pager.css">
<link rel="stylesheet" type="text/css" href="${path}/css/zui.min.css">



</HEAD>
<BODY>
	<!--上面的导航条-->
	<div class="note_header">
		<!--LOGO-->
		<div
			style="float: right; height: 35px; padding: 6px 20px; width: 20%;">
			<img class="header_img" src="${path}/images/user_w.png"
				id="img_fastdoor" />
			<ul class="box_fastdoor">
				<li><a href="${path}/ShowMainPageByUser">主页</a></li>
				<li><a href="${path}/ShowBrief4BlogQuesController">广场</a></li>
				<li><a href="${path}/ShowJobControllerByUser">招聘</a></li>
				<li><a href="${path}/ShowNewsControllerByUser">新闻</a></li>
			</ul>
			<a href="javascript:void(0);" onclick="logout();"><img class="header_img"
				src="${path}/images/logout_w.png" /></a>
		</div>
		<div style="width: 40%; height: 47px; margin: 5px;">
			<img src="${path}/images/logo_w.png" />
		</div>



	</div>
	<!--Body-->
	<div style="width: 100%; height: 730px; padding-top: 48px;">
		<div class="note_body center-block">

			<div class="sub_title">
				<h1 style="color: #3280FC; padding-top: 5px;">求知信息—新闻中心</h1>
			</div>


			<div
				style="width: 100%; border-bottom: #666 2px solid; height: 35px;">


				<div
					style="width: 100%; border-bottom: #666 2px solid; height: 35px;">
					<div style="float: right; width: 60%; padding-bottom: 5px;">
						<form>
							<button type="submit" class="btn btn-default f_right">
								<i class="icon-search"></i>
							</button>
							<input type="text" class="form-control searchbox"
								placeholder="Search" style="width: 180px;" />
						</form>
					</div>
					<h2 style="color: #3280FC; padding-top: 5px;">新闻总览</h2>
				</div>
				<!--main middle body-->
				<div style="width: 100%; height: 500px;">

					<!-- left classify-->
					<div class="box_noteclas">
						<div class="note_clas">
							<a href="${path}/ShowNewsControllerByUser" style="color: #333">所有新闻</a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=ios"><span id="clas_show">IOS</span></a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=android"><span id="clas_show">Android</span></a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=html"><span id="clas_show">HTML</span></a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=javascript"><span id="clas_show">Java Script</span></a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=css"><span id="clas_show">CSS</span></a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=javaee"><span id="clas_show">JavaEE</span></a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=ssh"><span id="clas_show">SSH</span></a>
						</div>
						<div class="note_sclas">
							<a href="${path}/ShowNewsControllerByUser?kind=wp"><span id="clas_show">Windows Phone</span></a>
						</div>


					</div>

					<!--left end  right begin-->
					<div class="box_right">
						<c:choose>
							<c:when test="${empty(page.list) }">管理员小伙伴偷懒啦，还木有信息(#‵′)=</c:when>
							<c:otherwise>
								<table class="note_table" id="t_newshow">
									<tr>
										<th width="20%">类别</th>
										<th width="60%">标题</th>
										<th>发布日期</th>
									</tr>
									<c:forEach var="news" items="${page.list }">
									<tr>
										<td>${news.kind }</td>
										<td><a href="${path}/ShowNewsContentController?id=${news.id}">${news.title }</a></td>
										<td><fmt:formatDate value="${news.time}" pattern="yyyy-MM-dd"/></td>
									</tr>
									</c:forEach>
								</table>
							</c:otherwise>
						</c:choose>
						<!--add pager here-->
						<jsp:include page="/jsp/utils/newspager.jsp"></jsp:include>
						<!-- pager End here -->
					</div>

				</div>
				<!--FOOT -->
				<div class="user_foot">Copyrights(C)1997-2014 求知无限有限公司 Thirsty
					for Knowledge Co.Ltd 版权所有 不得转载</div>
				<!--FOOT END-->
				<script type="text/javascript">
					//注销
					function logout() {
						$.post("/qiuzhi/LogoutController", function(data) {
							if (data == "1") {
								alert("注销成功");
								window.location.href = "/qiuzhi/index.html";
							}
						});
					}
				</script>
			</div>
		</div>

	</div>
	<script type="text/javascript" src="${path}/js/zui.min.js"></script>
	<script type="text/javascript" src="${path}/js/jquery-1.11.1.min.js"></script>
	<script type="text/javascript" src="${path}/js/musge.js"></script>
</BODY>
</html>
